repair according to condition

状态修